<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>

  // es6 
var arr = [1,1,'true','true',true,true,15,15,false,false, undefined,undefined, null,null, NaN, NaN,'NaN', 0, 0, 'a', 'a',{},{}];

var newArr =  new Set(arr)
console.log(newArr); 

// 0: 1
// 1: "true"
// 2: true
// 3: 15
// 4: false
// 5: undefined
// 6: null
// 7: NaN
// 8: "NaN"
// 9: 0
// 10: "a"
// 11: Object
// 12: Object

// 两个对象并没有去重成功  还是有点缺陷

    </script>
</body>
</html>